//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.beetl.sql.gen;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import java.util.stream.Collectors;
import org.beetl.sql.clazz.TableDesc;

public class Entity {
    String name;
    String tableName;
    String catalog;
    String comment;
    String parentClass;
    ArrayList<Attribute> list = new ArrayList();
    Set<String> importPackage = new TreeSet();
    TableDesc tableDesc;
    String dictVar;
    String dictVarType;

    public List<String> getCols() {
        return (List)this.list.stream().map((attribute) -> attribute.getColName()).collect(Collectors.toList());
    }

    public String getName() {
        return this.name;
    }

    public String getTableName() {
        return this.tableName;
    }

    public String getCatalog() {
        return this.catalog;
    }

    public String getComment() {
        return this.comment;
    }

    public String getParentClass() {
        return this.parentClass;
    }

    public ArrayList<Attribute> getList() {
        return this.list;
    }

    public Set<String> getImportPackage() {
        return this.importPackage;
    }

    public TableDesc getTableDesc() {
        return this.tableDesc;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public void setTableName(final String tableName) {
        this.tableName = tableName;
    }

    public void setCatalog(final String catalog) {
        this.catalog = catalog;
    }

    public void setComment(final String comment) {
        this.comment = comment;
    }

    public void setParentClass(final String parentClass) {
        this.parentClass = parentClass;
    }

    public void setList(final ArrayList<Attribute> list) {
        this.list = list;
    }

    public void setImportPackage(final Set<String> importPackage) {
        this.importPackage = importPackage;
    }

    public void setTableDesc(final TableDesc tableDesc) {
        this.tableDesc = tableDesc;
    }

    public String getDictVar() {
        return dictVar;
    }

    public void setDictVar(String dictVar) {
        this.dictVar = dictVar;
    }

    public String getDictVarType() {
        return dictVarType;
    }

    public void setDictVarType(String dictVarType) {
        this.dictVarType = dictVarType;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof Entity)) {
            return false;
        } else {
            Entity other = (Entity)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$tableName = this.getTableName();
                Object other$tableName = other.getTableName();
                if (this$tableName == null) {
                    if (other$tableName != null) {
                        return false;
                    }
                } else if (!this$tableName.equals(other$tableName)) {
                    return false;
                }

                Object this$catalog = this.getCatalog();
                Object other$catalog = other.getCatalog();
                if (this$catalog == null) {
                    if (other$catalog != null) {
                        return false;
                    }
                } else if (!this$catalog.equals(other$catalog)) {
                    return false;
                }

                Object this$comment = this.getComment();
                Object other$comment = other.getComment();
                if (this$comment == null) {
                    if (other$comment != null) {
                        return false;
                    }
                } else if (!this$comment.equals(other$comment)) {
                    return false;
                }

                Object this$parentClass = this.getParentClass();
                Object other$parentClass = other.getParentClass();
                if (this$parentClass == null) {
                    if (other$parentClass != null) {
                        return false;
                    }
                } else if (!this$parentClass.equals(other$parentClass)) {
                    return false;
                }

                Object this$list = this.getList();
                Object other$list = other.getList();
                if (this$list == null) {
                    if (other$list != null) {
                        return false;
                    }
                } else if (!this$list.equals(other$list)) {
                    return false;
                }

                Object this$importPackage = this.getImportPackage();
                Object other$importPackage = other.getImportPackage();
                if (this$importPackage == null) {
                    if (other$importPackage != null) {
                        return false;
                    }
                } else if (!this$importPackage.equals(other$importPackage)) {
                    return false;
                }

                Object this$tableDesc = this.getTableDesc();
                Object other$tableDesc = other.getTableDesc();
                if (this$tableDesc == null) {
                    if (other$tableDesc != null) {
                        return false;
                    }
                } else if (!this$tableDesc.equals(other$tableDesc)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Entity;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $tableName = this.getTableName();
        result = result * 59 + ($tableName == null ? 43 : $tableName.hashCode());
        Object $catalog = this.getCatalog();
        result = result * 59 + ($catalog == null ? 43 : $catalog.hashCode());
        Object $comment = this.getComment();
        result = result * 59 + ($comment == null ? 43 : $comment.hashCode());
        Object $parentClass = this.getParentClass();
        result = result * 59 + ($parentClass == null ? 43 : $parentClass.hashCode());
        Object $list = this.getList();
        result = result * 59 + ($list == null ? 43 : $list.hashCode());
        Object $importPackage = this.getImportPackage();
        result = result * 59 + ($importPackage == null ? 43 : $importPackage.hashCode());
        Object $tableDesc = this.getTableDesc();
        result = result * 59 + ($tableDesc == null ? 43 : $tableDesc.hashCode());
        return result;
    }

    public String toString() {
        return "Entity(name=" + this.getName() + ", tableName=" + this.getTableName() + ", catalog=" + this.getCatalog() + ", comment=" + this.getComment() + ", parentClass=" + this.getParentClass() + ", list=" + this.getList() + ", importPackage=" + this.getImportPackage() + ", tableDesc=" + this.getTableDesc() + ")";
    }
}
